<?php
/**
 * BootAdmin is committed to providing solutions for quickly building web applications
 * Please view the LICENSE file that was distributed with this source code,
 * For the full copyright and license information.
 * Thank you very much for using BootAdmin.
 *
 * @Author G.r<root@BootAdmin.com>
 */

declare (strict_types=1);

namespace app\admin\controller;

use app\admin\Base;
use app\admin\logic\LoginLogic;
use app\admin\validate\LoginValidate;

/**
 * 管理员控制器
 */
class User extends Base
{
    public array $notNeedRight = ['getInfo'];

    protected LoginLogic $logic;

    /**
     * 初始化
     */
    public function initialize()
    {
        parent::initialize(); // TODO: Change the autogenerated stub
        $this->logic = new LoginLogic();
    }

    /**
     * 获取用户信息
     */
    public function getInfo()
    {
        return $this->data($this->logic->getInfo(['id' => $this->adminId]));
    }
}